﻿/*
openEco 0.000.1
Steven Chick  111111
Added Public Calculation
 */
 
 
using System;
using System.Collections.Generic;
using System.Text;

namespace openEco
{
	/// <summary>
	/// Top level openEco class.
	/// </summary>

	
	
	public class OpenEco : IOpenEco
	{
		//PUBLIC OBJECTS
		public Application app;
		public Model model;
		public Weather weather;
		public Object obj;
        public Calculation calc;
        public ObjectRequest objreq;
        public FitGrid fit;
        public Zone zon;
		
		//PUBLIC PROPERTIES
		
		//PUBLIC METHODS
		
		//connect
		public void connect(){
			cmd = new NDde.Client.DdeClient("Ecotect", "execute");
			cmd.Connect();
			rq = new NDde.Client.DdeClient("Ecotect", "request");
			rq.Connect();
			
			//Initialize public objects
			app = new Application(cmd, rq);
			model = new Model(cmd, rq);
			weather = new Weather(cmd, rq);
			obj = new Object(cmd, rq);
            calc = new Calculation(cmd, rq);
            objreq = new ObjectRequest(cmd, rq);
            fit = new FitGrid(cmd,rq);
            zon = new Zone(cmd,rq);
		}
		
		//disconnect
		public void disconnect(){
			cmd.Disconnect();
            rq.Disconnect();
		}
		
		//CONSTRUCTORS
		public OpenEco(){
			
		}
		
	}
	
	
	
}